﻿@model MvcApplication2.Models.UserMessage

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_DevLayout.cshtml";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>UserMessage</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Type)
            @Html.ValidationMessageFor(model => model.Type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OwnerId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OwnerId)
            @Html.ValidationMessageFor(model => model.OwnerId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PrivateThread)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PrivateThread)
            @Html.ValidationMessageFor(model => model.PrivateThread)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ParentMessageId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ParentMessageId)
            @Html.ValidationMessageFor(model => model.ParentMessageId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ExerciseId, "Exercise")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ExerciseId", String.Empty)
            @Html.ValidationMessageFor(model => model.ExerciseId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Currency)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Currency)
            @Html.ValidationMessageFor(model => model.Currency)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Reward)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Reward)
            @Html.ValidationMessageFor(model => model.Reward)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
